Grid Layoutを用いてresponsiveをやる
Grid Layoutを用いてResponsive Design
@mediaを使わずにResponsive Designができる
minmax()やrepeat()を使う
code:css
.cssgrid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
grid-auto-rows: 1fr;
grid-gap: 0.8em;
border: 1px solid #ddd;
padding: 0.8em;
margin: 0 0 2em;
}
.cssgrid > div {
background: #ddd;
overflow: auto;
min-width: 0;
padding: 1em;
}
この指定って、「最大2column」って指定できるのか #??
minmax()のminの方をイメージ50%にしないといけないが、それでは上手くいかないmrsekut.icon
200pxみたいに固定値を使用したくないのだが。
https://parashuto.com/rriver/development/responsive-layout-with-css-grid-and-flexbox
https://coliss.com/articles/build-websites/operation/css/how-to-use-css-minmax.html